import { useState, useEffect } from 'react';

import { findSourceInfoService, findSourceInviteService } from '../services/UpdateService';
import { message } from 'antd';
import { IUpdateEnum } from './UpdateReducer';
import _ from 'lodash';

/**
 * @useSourceUpdate 处理数据请求
 * @stepKey 步骤条步数
 * @type 当前页面操作方式/新增/编辑
 */
export const useSourceUpdate = ({
  infoObj,
  stepKey,
  projectInfo,
  type,
  SourceInviteMethods,
  SourceClarifyMethods,
  SourceExpertsMethods,
  SourceSupplierMethods,
  SourceCalibrateMethods,
  SourceChangeMethods,

  dispatch,
}: Record<string, any>) => {
  // 控制添加寻源整体页面的Spin
  const [loading, setLoading] = useState(false);

  const { findSourceInfoRun } = findSourceInfoService();

  const { findSourceInviteRun, findSourceInviteLoading } = findSourceInviteService();

  // 获取采购实施详情servic

  return {
    loading,
    setLoading,
  };
};
